class THaDecData: public THaApparatus


 Hall A miscellaneous decoder data, which typically does not
 belong to a detector class.
 Provides global data to analyzer, and
 a place to rapidly add new channels.

 Normally the user should have a file "" in their pwd
 to define the locations of raw data for this class (only).
 But if this file is not found, we define a default mapping, which
 was valid at least at one point in history.

 The scheme is as follows:

    1. In Init() we define a list of global variables which are tied
       to the variables of this class.  E.g. "timeroc2".

    2. Next we build a list of "BdataLoc" objects which store information
       about where the data are located.  These data are either directly
       related to the variables of this class (e.g. timeroc2 is a raw
       data word) or one must analyze them to obtain a variable.

    3. The BdataLoc objects may be defined by which has an
       obvious notation (see ~/examples/  The entries are either
       locations in crates or locations relative to a unique header.
       If is not in the pwd where you run analyzer, then this
       class uses its own internal DefaultMap().

    4. The BdataLoc objects pertain to one data channel (e.g. a fastbus
       channel) and and may be multihit.

    5. To add a new variable, if it is on a single-hit channel, you may
       imitate 'synchadc1' if you know the (crate,slot,chan), and
       imitate 'timeroc2' if you know the (crate,header,no-to-skip).
       If your variable is more complicated and relies on several
       channels, imitate the way 'bits' leads to 'evtypebits'.

 R. Michaels, March 2002

 OR  (NEW as of April 2004:  R.J. Feuerbach)
       If you are simply interested in the readout of a channel, create
       a name for it and give the location in the map file and a
       global variable will be automatically created to monitor that channel.
     Unfortunately, this leads to a limitation of using arrays as opposed
     to variable-sized vector for the readout. Currently limited to 16 hits
     per channel per event.

Function Members (Methods)

THaDecData(const char* name = "D", const char* description = "")
voidTObject::AbstractMethod(const char* method) const
virtual Int_tTHaApparatus::AddDetector(THaDetector* det)
virtual voidTObject::AppendPad(Option_t* option = "")
virtual Int_tTHaApparatus::Begin(THaRunBase* r = 0)
virtual voidTObject::Browse(TBrowser* b)
static TClass*Class()
virtual const char*TObject::ClassName() const
virtual TObject*TNamed::Clone(const char* newname = "") const
virtual Int_tTHaApparatus::CoarseReconstruct()
virtual Int_tTNamed::Compare(const TObject* obj) const
virtual voidTNamed::Copy(TObject& named) const
virtual Int_tDecode(const THaEvData&)
static Int_tTHaAnalysisObject::DefineVarsFromList(const void* list, THaAnalysisObject::EType type, THaAnalysisObject::EMode mode, const char* var_prefix, const TObject* obj, const char* prefix, const char* here)
virtual voidTObject::Delete(Option_t* option = "")MENU
virtual Int_tTObject::DistancetoPrimitive(Int_t px, Int_t py)
virtual voidTObject::Draw(Option_t* option = "")
virtual voidTObject::DrawClass() constMENU
virtual TObject*TObject::DrawClone(Option_t* option = "") constMENU
virtual voidTObject::Dump() constMENU
virtual Int_tEnd(THaRunBase* r = 0)
virtual voidTObject::Error(const char* method, const char* msgfmt) const
virtual voidTObject::Execute(const char* method, const char* params, Int_t* error = 0)
virtual voidTObject::Execute(TMethod* method, TObjArray* params, Int_t* error = 0)
virtual voidTObject::ExecuteEvent(Int_t event, Int_t px, Int_t py)
virtual voidTObject::Fatal(const char* method, const char* msgfmt) const
virtual voidTNamed::FillBuffer(char*& buffer)
virtual TObject*TObject::FindObject(const char* name) const
virtual TObject*TObject::FindObject(const TObject* obj) const
static voidTHaAnalysisObject::GeoToSph(Double_t th_geo, Double_t ph_geo, Double_t& th_sph, Double_t& ph_sph)
const char*THaAnalysisObject::GetConfig() const
virtual const char*THaAnalysisObject::GetDBFileName() const
Int_tTHaAnalysisObject::GetDebug() const
virtual THaDetector*THaApparatus::GetDetector(const char* name)
const TList*THaApparatus::GetDetectors()
virtual Option_t*TObject::GetDrawOption() const
static Long_tTObject::GetDtorOnly()
virtual const char*TObject::GetIconName() const
TDatimeTHaAnalysisObject::GetInitDate() const
virtual const char*TNamed::GetName() const
Int_tTHaApparatus::GetNumDets() const
virtual char*TObject::GetObjectInfo(Int_t px, Int_t py) const
static Bool_tTObject::GetObjectStat()
virtual Option_t*TObject::GetOption() const
const char*THaAnalysisObject::GetPrefix() const
virtual const char*TNamed::GetTitle() const
virtual UInt_tTObject::GetUniqueID() const
virtual Bool_tTObject::HandleTimer(TTimer* timer)
virtual ULong_tTNamed::Hash() const
virtual voidTObject::Info(const char* method, const char* msgfmt) const
virtual Bool_tTObject::InheritsFrom(const char* classname) const
virtual Bool_tTObject::InheritsFrom(const TClass* cl) const
virtual THaAnalysisObject::EStatusInit(const TDatime& run_time)
virtual Int_tTHaAnalysisObject::InitOutput(THaOutput*)
virtual voidTObject::Inspect() constMENU
static Bool_tTHaAnalysisObject::IntersectPlaneWithRay(const TVector3& xax, const TVector3& yax, const TVector3& org, const TVector3& ray_start, const TVector3& ray_vect, Double_t& length, TVector3& intersect)
voidTObject::InvertBit(UInt_t f)
virtual TClass*IsA() const
virtual Bool_tTObject::IsEqual(const TObject* obj) const
virtual Bool_tTObject::IsFolder() const
Bool_tTHaAnalysisObject::IsInit() const
Bool_tTHaAnalysisObject::IsOK() const
Bool_tTObject::IsOnHeap() const
virtual Bool_tTNamed::IsSortable() const
Bool_tTObject::IsZombie() const
static Int_tTHaAnalysisObject::LoadDB(FILE* file, const TDatime& date, const DBRequest* request, const char* prefix = "", Int_t search = 0)
static Int_tTHaAnalysisObject::LoadDB(FILE* file, const TDatime& date, const TagDef* tags, const char* prefix = "", Int_t search = 0)
static Int_tTHaAnalysisObject::LoadDBvalue(FILE* file, const TDatime& date, const char* tag, Double_t& value)
static Int_tTHaAnalysisObject::LoadDBvalue(FILE* file, const TDatime& date, const char* tag, Int_t& value)
static Int_tTHaAnalysisObject::LoadDBvalue(FILE* file, const TDatime& date, const char* tag, string& text)
static Int_tTHaAnalysisObject::LoadDBvalue(FILE* file, const TDatime& date, const char* tag, TString& text)
virtual voidTNamed::ls(Option_t* option = "") const
voidTObject::MayNotUse(const char* method) const
virtual Bool_tTObject::Notify()
static FILE*THaAnalysisObject::OpenFile(const char* name, const TDatime& date, const char* here = "OpenFile()", const char* filemode = "r", const int debug_flag = 1)
static voidTObject::operator delete(void* ptr)
static voidTObject::operator delete(void* ptr, void* vp)
static voidTObject::operator delete[](void* ptr)
static voidTObject::operator delete[](void* ptr, void* vp)
void*TObject::operator new(size_t sz)
void*TObject::operator new(size_t sz, void* vp)
void*TObject::operator new[](size_t sz)
void*TObject::operator new[](size_t sz, void* vp)
TNamed&TNamed::operator=(const TNamed& rhs)
virtual voidTObject::Paint(Option_t* option = "")
virtual voidTObject::Pop()
virtual Int_tTObject::Read(const char* name)
virtual Int_tReconstruct()
virtual voidTObject::RecursiveRemove(TObject* obj)
voidReset(Option_t* opt = "")
voidTObject::ResetBit(UInt_t f)
virtual voidTObject::SaveAs(const char* filename = "", Option_t* option = "") constMENU
virtual voidTObject::SavePrimitive(basic_ostream<char,char_traits<char> >& out, Option_t* option = "")
static Int_tTHaAnalysisObject::SeekDBconfig(FILE* file, const char* tag, const char* label = "config", Bool_t end_on_tag = false)
static Int_tTHaAnalysisObject::SeekDBdate(FILE* file, const TDatime& date, Bool_t end_on_tag = false)
voidTObject::SetBit(UInt_t f)
voidTObject::SetBit(UInt_t f, Bool_t set)
voidTHaAnalysisObject::SetConfig(const char* label)
virtual voidTHaAnalysisObject::SetDebug(Int_t level)
virtual voidTHaApparatus::SetDebugAll(Int_t level)
virtual voidTObject::SetDrawOption(Option_t* option = "")MENU
static voidTObject::SetDtorOnly(void* obj)
virtual voidTHaAnalysisObject::SetName(const char* name)
virtual voidTHaAnalysisObject::SetNameTitle(const char* name, const char* title)
static voidTObject::SetObjectStat(Bool_t stat)
virtual voidTNamed::SetTitle(const char* title = "")MENU
virtual voidTObject::SetUniqueID(UInt_t uid)
virtual voidShowMembers(TMemberInspector& insp, char* parent)
virtual Int_tTNamed::Sizeof() const
static voidTHaAnalysisObject::SphToGeo(Double_t th_sph, Double_t ph_sph, Double_t& th_geo, Double_t& ph_geo)
THaAnalysisObject::EStatusTHaAnalysisObject::Status() const
virtual voidStreamer(TBuffer& b)
voidStreamerNVirtual(TBuffer& b)
virtual voidTObject::SysError(const char* method, const char* msgfmt) const
Bool_tTObject::TestBit(UInt_t f) const
Int_tTObject::TestBits(UInt_t f) const
virtual voidTObject::UseCurrentStyle()
static vector<std::string>THaAnalysisObject::vsplit(const string& s)
virtual voidTObject::Warning(const char* method, const char* msgfmt) const
virtual Int_tTObject::Write(const char* name = 0, Int_t option = 0, Int_t bufsize = 0)
virtual Int_tTObject::Write(const char* name = 0, Int_t option = 0, Int_t bufsize = 0) const
virtual voidWriteHist()
virtual BdataLoc*DefineChannel(BdataLoc*, THaAnalysisObject::EMode, const char* desc = "automatic")
virtual Int_tTHaAnalysisObject::DefineVariables(THaAnalysisObject::EMode mode = kDefine)
Int_tTHaAnalysisObject::DefineVarsFromList(const VarDef* list, THaAnalysisObject::EMode mode = kDefine, const char* var_prefix = "") const
Int_tTHaAnalysisObject::DefineVarsFromList(const RVarDef* list, THaAnalysisObject::EMode mode = kDefine, const char* var_prefix = "") const
Int_tTHaAnalysisObject::DefineVarsFromList(const void* list, THaAnalysisObject::EType type, THaAnalysisObject::EMode mode, const char* var_prefix = "") const
virtual voidTObject::DoError(int level, const char* location, const char* fmt, va_list va) const
THaAnalysisObject*THaAnalysisObject::FindModule(const char* name, const char* classname, bool do_error = true)
static vector<std::string>THaAnalysisObject::GetDBFileList(const char* name, const TDatime& date, const char* here = "GetDBFileList()")
virtual const char*THaAnalysisObject::Here(const char*) const
virtual voidTHaApparatus::MakePrefix()
virtual FILE*THaAnalysisObject::OpenFile(const TDatime& date)
virtual FILE*THaAnalysisObject::OpenRunDBFile(const TDatime& date)
static char*THaAnalysisObject::ReadComment(FILE* fp, char* buf, const int len)
virtual Int_tTHaAnalysisObject::ReadDatabase(const TDatime& date)
virtual Int_tTHaAnalysisObject::ReadRunDatabase(const TDatime& date)
virtual Int_tTHaAnalysisObject::RemoveVariables()
virtual voidBookHist()
virtual voidClear(Option_t* opt = "")
virtual voidPrint(Option_t* opt = "") const
Int_tSetupDecData(const TDatime* runTime = 0, THaAnalysisObject::EMode mode = kDefine)
voidTrigBits(UInt_t ibit, BdataLoc* dataloc)

Data Members

enum THaAnalysisObject::EStatus { kOK
enum THaAnalysisObject::EType { kVarDef
enum THaAnalysisObject::EMode { kDefine
enum THaAnalysisObject::EProperties { kNeedsRunDB
enum TObject::EStatusBits { kCanDelete
enum TObject::[unnamed] { kIsOnHeap
static const Double_tTHaAnalysisObject::kBig= 1.e38; // default junk value
TStringTHaAnalysisObject::fConfigConfiguration to use from database
Int_tTHaAnalysisObject::fDebugDebug level
TList*THaApparatus::fDetectorsList of all detectors for this apparatus
TDatimeTHaAnalysisObject::fInitDateDate passed to Init
Bool_tTHaAnalysisObject::fIsInitFlag indicating that ReadDatabase done
Bool_tTHaAnalysisObject::fIsSetupFlag indicating that DefineVariables done.
TStringTNamed::fNameobject identifier
Bool_tTHaAnalysisObject::fOKOutFlag indicating object-output prepared
char*THaAnalysisObject::fPrefixName prefix for global variables
UInt_tTHaAnalysisObject::fPropertiesProperties of this object (see EProperties)
THaAnalysisObject::EStatusTHaAnalysisObject::fStatusInitialization status flag
TStringTNamed::fTitleobject title
vector<BdataLoc*>fCrateLocRaw Data locations by crate, slot, channel
vector<BdataLoc*>fWordLocRaw Data locations relative to header word
static THaDecData*fgThisPointer to instance of this class
static Int_tfgVdcEffFirstIf >0, initialize VdcEff() on next call

Class Charts

Inheritance Chart:

Function documentation

THaDecData(const char* name = "D", const char* description = "")
void Clear(Option_t* opt = "")
 Clear the object (set event-by-event data to zero)
void Reset(Option_t* opt = "")
 Reset the object (zero all data, including histograms)
Int_t SetupDecData(const TDatime* runTime = 0, THaAnalysisObject::EMode mode = kDefine)
 Register global variables, open decdata map file, and parse it.
 If mode == kDelete, remove global variables.
BdataLoc* DefineChannel(BdataLoc* , THaAnalysisObject::EMode , const char* desc = "automatic")
Int_t End(THaRunBase* r = 0)
void WriteHist()
  cout << "Writing Bob Dec Data histos"<<endl<<flush;
void BookHist()
 VDC efficiencies
THaAnalysisObject::EStatus Init(const TDatime& run_time)
 Custom Init() method. Since this apparatus has no detectors, we
 skip the detector initialization.
Int_t DefaultMap()
 Default setup of mapping of data in this class to locations in the raw data.
 This is valid for a particular time.  If you have '' in your
 pwd, the code would use that instead.  See /examples directory for an
 example of
Int_t Decode(const THaEvData& )
 Extract the requested variables from the event data
void VdcEff( )
 Update VDC efficiency histograms with current event data
void Print(Option_t* opt = "") const
 Dump the data for purpose of debugging.
void TrigBits(UInt_t ibit, BdataLoc* dataloc)
 Figure out which triggers got a hit.  These are multihit TDCs, so we
 need to sort out which hit we want to take by applying cuts.
Int_t Reconstruct()
{ return 0; }

Last change: Sat Nov 7 21:26:44 2009
Last generated: 2009-11-07 21:26

This page has been automatically generated. If you have any comments or suggestions about the page layout send a mail to ROOT support, or contact the developers with any questions or problems regarding ROOT.