AliRoot Core  3dc7879 (3dc7879)
AliRawDataHeaderSim.h
Go to the documentation of this file.
1 #ifndef ALIRAWDATAHEADERSIM_H
2 #define ALIRAWDATAHEADERSIM_H
3 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4  * See cxx source for full Copyright notice */
5 
6 #include <TError.h>
7 
8 #include "AliRawDataHeaderV3.h"
9 #include "AliRunLoader.h"
10 #include "AliCentralTrigger.h"
11 
12 class AliRawDataHeaderSim : public AliRawDataHeaderV3 {
13 
14 public:
15  AliRawDataHeaderSim() : AliRawDataHeaderV3() {
16  // Takes the trigger mask and
17  // stores it in the data header
18  AliRunLoader *runloader = AliRunLoader::Instance();
19  if (runloader) {
20  if(!runloader->GetTrigger()) runloader->LoadTrigger();
21  if (AliCentralTrigger *aCTP = runloader->GetTrigger()) {
22  ULong64_t mask = aCTP->GetClassMask();
23  ULong64_t masknext = aCTP->GetClassMaskNext50();
24  SetTriggerClass(mask);
25  SetTriggerClassNext50(masknext);
26  }
27  else
28  Warning("SetTriggerClass","No trigger can be loaded! Putting empty trigger class into the raw data header !");
29  }
30  else
31  Error("SetTriggerClass","No run loader is available! Putting empty trigger class into the raw data header !");
32  }
33 
34 };
35 
36 #endif
static AliRunLoader * Instance()
Definition: AliRunLoader.h:176
AliCentralTrigger * GetTrigger() const
Int_t LoadTrigger(Option_t *option="READ")