Re: [Brahms-dev-l] Issue with Histogram flag

From: flemming videbaek <videbaek@rcf.rhic.bnl.gov>
Date: Tue Jan 04 2005 - 12:36:26 EST
Hi Erik,

I believe that the Module manager do not set the HistOn() flag until after
the booking is complete.
So you should just remove the HistOn(0 condition in the DefineHistogram..

/fv
----------------------------------------------------------------
Flemming Videbaek
Physics Department
Brookhaven National Laboratory

e-mail: videbaek@bnl.gov
phone: 631-344-4106
----- Original Message ----- 
From: "Johnson, Erik B" <ebj@ku.edu>
To: "Brahms Dev" <brahms-dev-l@lists.bnl.gov>
Sent: Tuesday, January 04, 2005 12:16 PM
Subject: [Brahms-dev-l] Issue with Histogram flag


> Brahms,
>
> CAN ANYONE HELP ME???
>
>
>   I do not understand a bug that I have in my code.  It has to do with the
BrModule fHistOn flag that one should be able to set using either
> BrModule::SetHistOn() or BrModule::SetHistOff().
>
>
>   Here is my issue.  I define a flow module
>
> BrFlowModule *flsi3mod = new BrFlowModule("flow3","flsi*_3");
flsi3mod->SetHistOff();
> flsi3mod->SetTreeOn(kTRUE);
> appModule->AddModule(flsi3mod);
>
> In BrFlowModule::DefineHistograms(), I have
>
>   if (HistOn()) {
>     hVtx = new TH1F("hVtx","Vertex location",500,-100,100);
> ...
> }
>
>
> Then in BrFlowModule::Event(BrEventNode* inNode, BrEventNode* outNode)
> there is
>   if (HistOn()) {
>     cout<<"Histogramming is ON!!!"<<endl;
>     hVtx->Fill(fVertex);
>  }
>
>
> When I run the code, I get the message
> Histogramming is ON!!!
> and a segmentation violation.
>
> I know how to fix the problem, but I am more or less looking for anyone
who has seen this same problem and what they did to fix it.
>
>
> Erik
>
>
>
>
> _______________________________________________
> Brahms-dev-l mailing list
> Brahms-dev-l@lists.bnl.gov
> http://lists.bnl.gov/mailman/listinfo/brahms-dev-l
>


_______________________________________________
Brahms-dev-l mailing list
Brahms-dev-l@lists.bnl.gov
http://lists.bnl.gov/mailman/listinfo/brahms-dev-l
Received on Tue Jan 4 12:33:33 2005

This archive was generated by hypermail 2.1.8 : Tue Jan 04 2005 - 12:33:54 EST