ROOT logo
HYDRA - THE HADES ANALYSIS PACKAGE » RUNTIMEDB » HSlowPar

class HSlowPar: public HParSet

_HADES_CLASS_DESCRIPTION

   HSlowPar

   Container to keep slowcontrol summary informations for a bunch of
   channels (mean, rm, min, max values) for a list of runs.

   //##################################################

   HOWTO FILL the container in a macro:

   HSlowPar p("HSlowPar_test","HSlowPar_test");

   HSlowChan c;
   c.mean = 1750.;
   c.rms  = 5;
   c.min  = 1740.;
   c.max  = 1760.;
   c.print()

   p.setChannel(runID,"HV_MDC_example",&c,kFALSE); // set channel in macro to write to ROOT/ASCII
   ..... more channels and runIDs
   p.makeChannelList(kTRUE); // kTRUE = sort, call this function after all channels have been set
                             // needed to create the list of channels

   //--------------------------------------------------
   For the init from ORACLE the list of channels has to be
   set before and the Partition specified (all runs for the day
   of the runID used for init will be added automatically):

   HSlowPar p("HSlowPar_test","HSlowPar_test");
   p->addToChannelList(""HV_MDC_example""); // add a channel name
   p->setPartition("online);  // during beam time
                              // (default is offline) after slow control
                              // summaries are moved to final tables
   //--------------------------------------------------

   //##################################################

   HOWTO USE the container:

   HSlowPar* p = (HSlowPar*)gHades->getRuntimeDb()->getConatiner("SlowPar");
   Double_t values[4];
   p->getChannel(runid,"HV_MDC_example",&c);        // get Channel with name for a given runID
   p->getChannel(runid,"HV_MDC_example",values);    // get Channel with name for a given runID

   p->printParam();                         // print container content
   p->printChannel(runID,"HV_MDC_example"); // print a single channel
   Bool_t ok = p->findRunId(runID);         // is this runID inside ?
   Int_t first,last;
   p->getRangeRunID(first,last);            // get first and last runID inside the container
   Int_t n = p->getNRunIDs();               // get the number runIDs inside the container
   TList* list = p->getChannelList();       // get the list of channel names


Function Members (Methods)

public:
HSlowPar(const Char_t* name = "SlowPar", const Char_t* title = "Slow Control Summary container", const Char_t* context = "SlowParProduction")
virtual~HSlowPar()
voidTObject::AbstractMethod(const char* method) const
voidaddToChannelList(TString name, Bool_t sort = kFALSE)
virtual voidTObject::AppendPad(Option_t* option = "")
virtual voidTObject::Browse(TBrowser* b)
static TClass*Class()
virtual const char*TObject::ClassName() const
virtual voidclear()
virtual voidTNamed::Clear(Option_t* option = "")
virtual TObject*TNamed::Clone(const char* newname = "") const
virtual Int_tTNamed::Compare(const TObject* obj) const
virtual voidTNamed::Copy(TObject& named) const
voidHParSet::copyComment(HParSet& r)
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 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
Bool_tfindRunID(Int_t runId)
const Char_t*HParSet::getAuthor() const
Bool_tgetChannel(Int_t runID, TString name, Double_t* ar)
Bool_tgetChannel(Int_t runID, TString name, HSlowChan* chan)
const TList*getChannelList()
const Char_t*HParSet::getDescription() const
const Text_t*HParSet::getDetectorName()
virtual Option_t*TObject::GetDrawOption() const
static Long_tTObject::GetDtorOnly()
virtual const char*TObject::GetIconName() const
Int_tHParSet::getInputVersion(Int_t i)
virtual const char*TNamed::GetName() const
Int_tgetNRunIDs()
virtual char*TObject::GetObjectInfo(Int_t px, Int_t py) const
static Bool_tTObject::GetObjectStat()
virtual Option_t*TObject::GetOption() const
const Char_t*HParSet::getParamContext() const
TStringgetPartition()
Bool_tgetRangeRunID(Int_t& first, Int_t& last)
voidgetRunIDList(TArrayI* ar = 0)
virtual const char*TNamed::GetTitle() const
virtual UInt_tTObject::GetUniqueID() const
virtual Bool_tTObject::HandleTimer(TTimer* timer)
Bool_tHParSet::hasChanged()
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 Bool_tinit(HParIo* input, Int_t* set)
virtual voidTObject::Inspect() constMENU
voidTObject::InvertBit(UInt_t f)
virtual TClass*IsA() const
virtual Bool_tTObject::IsEqual(const TObject* obj) const
virtual Bool_tTObject::IsFolder() const
Bool_tTObject::IsOnHeap() const
virtual Bool_tTNamed::IsSortable() const
Bool_tHParSet::isStatic()
Bool_tTObject::IsZombie() const
virtual voidTNamed::ls(Option_t* option = "") const
voidmakeChannelList(Bool_t sort = kTRUE)
voidTObject::MayNotUse(const char* method) const
virtual Bool_tTObject::Notify()
voidTObject::Obsolete(const char* method, const char* asOfVers, const char* removedFromVers) const
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)
HParSet&HParSet::operator=(const HParSet&)
virtual voidTObject::Paint(Option_t* option = "")
virtual voidTObject::Pop()
virtual voidHParSet::print()
virtual voidTNamed::Print(Option_t* option = "") const
voidprintChannel(Int_t runID, TString name)
voidprintChannelList()
voidprintParam()
voidprintRunIDList()
voidputAsciiHeader(TString&)
virtual Int_tTObject::Read(const char* name)
Bool_treadline(const Char_t* buf)
virtual voidTObject::RecursiveRemove(TObject* obj)
voidremoveRun(Int_t runID)
voidreset(Int_t level = 0)
voidTObject::ResetBit(UInt_t f)
voidHParSet::resetInputVersions()
virtual voidTObject::SaveAs(const char* filename = "", Option_t* option = "") constMENU
virtual voidTObject::SavePrimitive(ostream& out, Option_t* option = "")
voidHParSet::setAuthor(const Char_t* s)
voidTObject::SetBit(UInt_t f)
voidTObject::SetBit(UInt_t f, Bool_t set)
voidHParSet::setChanged(Bool_t flag = kTRUE)
Bool_tsetChannel(Int_t runID, TString name, Double_t* ar, Bool_t overwrite = kFALSE)
Bool_tsetChannel(Int_t runID, TString name, HSlowChan* chan, Bool_t overwrite = kFALSE)
Bool_tsetChannelMap(Int_t runID)
voidHParSet::setDescription(const Char_t* s)
virtual voidTObject::SetDrawOption(Option_t* option = "")MENU
static voidTObject::SetDtorOnly(void* obj)
voidHParSet::setInputVersion(Int_t v = -1, Int_t i = 0)
virtual voidTNamed::SetName(const char* name)MENU
virtual voidTNamed::SetNameTitle(const char* name, const char* title)
static voidTObject::SetObjectStat(Bool_t stat)
voidHParSet::setParamContext(const Char_t*)
voidsetPartition(TString name)
voidHParSet::setStatic(Bool_t flag = kTRUE)
virtual voidTNamed::SetTitle(const char* title = "")MENU
virtual voidTObject::SetUniqueID(UInt_t uid)
virtual voidShowMembers(TMemberInspector&)
virtual Int_tTNamed::Sizeof() const
virtual voidStreamer(TBuffer&)
voidStreamerNVirtual(TBuffer& ClassDef_StreamerNVirtual_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()
virtual voidTObject::Warning(const char* method, const char* msgfmt) const
virtual Int_twrite(HParIo* output)
Bool_twrite(fstream& out)
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
protected:
virtual voidTObject::DoError(int level, const char* location, const char* fmt, va_list va) const
HSlowChan*findChannel(map<TString,HSlowChan*>* m, TString name)
map<TString,HSlowChan*>*findRunIDMap(Int_t runId)
voidTObject::MakeZombie()

Data Members

protected:
TStringHParSet::authorAuthor of parameters
Bool_tHParSet::changed! flag is kTRUE if parameters have changed
TStringHParSet::descriptionDescription of parameters
Text_tHParSet::detName[20]! name of the detector the container belongs to
Int_tfCurrentRunID! remember the current runID
TListfListChannelslist of channels
map<int,map<TString,HSlowChan*,less<TString>,allocator<pair<const TString,HSlowChan*> > >*,less<int>,allocator<pair<const int,map<TString,HSlowChan*,less<TString>,allocator<pair<const TString,HSlowChan*> > >*> > >::iteratorfMIter! remember the current ChannelMap
map<Int_t,map<TString,HSlowChan*>*>fMRunID
TStringTNamed::fNameobject identifier
TStringfPartitionName ORACLE SLOW CONTROL PARTION, to be set by user!!!
TStringTNamed::fTitleobject title
vector<Int_t>fVRunIDlist of runIDs
TStringHParSet::paramContextContext/purpose for parameters and conditions
Bool_tHParSet::status! static flag
Int_tHParSet::versions[3]! versions of container in the 2 possible inputs

Class Charts

Inheritance Inherited Members Includes Libraries
Class Charts

Function documentation

HSlowPar(const Char_t* name = "SlowPar", const Char_t* title = "Slow Control Summary container", const Char_t* context = "SlowParProduction")
void clear(void)
void reset(Int_t level = 0)
void removeRun(Int_t runID)
Bool_t init(HParIo* input, Int_t* set)
 intitializes the container from an input
Int_t write(HParIo* output)
 writes the container to an output
Bool_t readline(const Char_t* buf)
 decodes one line read from ascii file I/O
void putAsciiHeader(TString& )
Bool_t write(fstream& out)
 write ascii file
void printParam()
 print the content of the container
 in the order of all channels per runID
void printChannel(Int_t runID, TString name)
 print a single channel
void addToChannelList(TString name, Bool_t sort = kFALSE)
 add channel with name name to the list
 of channels
void makeChannelList(Bool_t sort = kTRUE)
 after setting all channels creatye the
 list of channels
void printChannelList()
void getRunIDList(TArrayI* ar = 0)
 coppies the list of runIDs into the TArrayI.
 The array will be rested before.
void printRunIDList()
Bool_t setChannel(Int_t runID,TString name, Double_t ar[], Bool_t overwrite)
 set a new channel for runID  with name name
 to the values provided by the array ar.
 if overwrite = kTRUE existing channels will
 be overwritten. if overwrite = kFALSE an attempt
 to add a channel with existing name will result
 in an error. To be called from a macro.
Bool_t setChannel(Int_t runID, TString name, HSlowChan* chan, Bool_t overwrite = kFALSE)
 set a new channel for runID  with name name
 to the values provided by the channel chan.
 if overwrite = kTRUE existing channels will
 be overwritten. if overwrite = kFALSE an attempt
 to add a channel with existing name will result
 in an error. To be called from a macro.
Bool_t getChannel(Int_t runID,TString name, Double_t values[])
 returns the values of channel name for a given runID
 to the array values
Bool_t getChannel(Int_t runID, TString name, HSlowChan* chan)
 returns the channel with name name for
 a given runID. Donot delete this object!
Bool_t setChannelMap(Int_t runID)
 creates channel map by using channel list for runID
 if the map exists it will be deleted and created new.
Bool_t findRunID(Int_t runId)
 returns kTRUE if the runID exists
HSlowChan* findChannel(map<TString,HSlowChan*>* m, TString name)
 returns the channel with name name
 from the map belonging to a runID
map<TString,HSlowChan*>* findRunIDMap(Int_t runId)
 returns the pointer to the map of channels
 for given runID
Bool_t getRangeRunID(Int_t& first, Int_t& last)
 returns the first and last runID in the container
~HSlowPar(void)
{}
void setPartition(TString name)
{ fPartition = name; }
TString getPartition()
{ return fPartition; }
Int_t getNRunIDs()
{ return fVRunID.size();}
const TList* getChannelList()
{ return &fListChannels;}