]> git.uio.no Git - u/mrichter/AliRoot.git/commit - STEER/STEER/AliTriggerDetector.cxx
Modifications to the trigger classes to have I/O. I
authorhristov <hristov@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 29 Mar 2006 17:35:20 +0000 (17:35 +0000)
committerhristov <hristov@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 29 Mar 2006 17:35:20 +0000 (17:35 +0000)
commitbacbe0fdbdcdafc29ed6025ba1e65802e848e2e6
tree8f776cf1af012ecd6ca8ac5cd4ec37f1421e2ef8
parent36b803affa45b37d38d308ff2611aefdf48a8a88
Modifications to the trigger classes to have I/O. I
also made changes in AliRunLoader and AliSimulation.

      the idea is to create a new file (Trigger.root) to store the CTP
information (one AliCentralTrigger object and a tree for the trigger class
mask event by event). I can change to galice.root if people think it is
better.

Each trigger detector object (with inputs) is store in the digits file in
the Event folder.

ZDC.Digits.root -\
                 |
                 |-Event0 -\
                 |         |-TreeD
                 |         \-Trigger
                 |
                 \-Event1-\
                          |-TreeD
                          \-Trigger
 added to AliRunLoader the following stuff:

 void                 MakeTrigger();
 Int_t                LoadTrigger(Option_t* option = "READ");
 void                 UnloadTrigger();
 TTree*               TreeCT() const; //returns the tree from folder;
shortcut method
 AliCentralTrigger*   GetTrigger() const;
 Int_t                WriteTrigger(Option_t* opt="");
 static TString       GetTriggerContainerName () {return
fgkTriggerContainerName;}
 static TString       GetTriggerBranchName () {return fgkTriggerBranchName;}
 static TString       GetTriggerFileName() { return
fgkDefaultTriggerFileName; }
 void                 CleanTrigger(){ Clean(fgkTriggerContainerName); }

 AliCentralTrigger    *fCTrigger; //! pointer to CEntral Trigger Processor
 static const TString   fgkDefaultTriggerFileName;//default file name with
trigger
 static const TString   fgkTriggerContainerName;   //default name of the
trigger container (TREE) name - TreeCT
 static const TString   fgkTriggerBranchName;      //default name of the
branch containing the trigger

 I also find an small error in AliRunLoader I think. In AliRunLoader::Open
when the session is open the method just print a warnnig and return the
loader but not update the internal pointer to the loader, so if after that
you ask with AliRunLoader::GetRunLoader() the aswer is 0x0.

So I change :

  AliWarningClass("Session is already opened and mounted in demanded folder");
  return result;
by
  AliWarningClass("Session is already opened and mounted in demanded folder");
  if (!fgRunLoader) fgRunLoader = result; //PH get access from any place
  return result;

to retrive the global class mask you can do:

   rl->LoadTrigger();
   AliCentralTrigger *aCTP = rl->GetTrigger();
   rl->GetEvent( i );
   cout << endl << "Event " << i
        << " Global Trigger Class Mask: 0x" << hex << aCTP->GetClassMask()
<< endl;
   rl->UnloadTrigger();

Regards
Ernesto
12 files changed:
STEER/AliCentralTrigger.cxx
STEER/AliCentralTrigger.h
STEER/AliRunLoader.cxx
STEER/AliRunLoader.h
STEER/AliSimulation.cxx
STEER/AliTriggerCondition.cxx
STEER/AliTriggerDescriptor.cxx
STEER/AliTriggerDescriptor.h
STEER/AliTriggerDetector.cxx
STEER/AliTriggerDetector.h
STEER/AliTriggerInput.cxx
STEER/AliTriggerInput.h