Update master to aliroot
[u/mrichter/AliRoot.git] / STEER / STEER / AliRawDataHeaderSim.h
CommitLineData
867ef916 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
480f0332 8#include "AliRawDataHeaderV3.h"
867ef916 9#include "AliRunLoader.h"
10#include "AliCentralTrigger.h"
11
480f0332 12class AliRawDataHeaderSim : public AliRawDataHeaderV3 {
867ef916 13
14public:
480f0332 15 AliRawDataHeaderSim() : AliRawDataHeaderV3() {
867ef916 16 // Takes the trigger mask and
17 // stores it in the data header
33c3c91a 18 AliRunLoader *runloader = AliRunLoader::Instance();
867ef916 19 if (runloader) {
31269f94 20 if(!runloader->GetTrigger()) runloader->LoadTrigger();
21 if (AliCentralTrigger *aCTP = runloader->GetTrigger()) {
867ef916 22 ULong64_t mask = aCTP->GetClassMask();
6848e3be 23 ULong64_t masknext = aCTP->GetClassMaskNext50();
867ef916 24 SetTriggerClass(mask);
6848e3be 25 SetTriggerClassNext50(masknext);
867ef916 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