2 /**************************************************************************
3 * This file is property of and copyright by the ALICE HLT Project *
4 * All rights reserved. *
6 * Primary Authors: Oystein Djuvsland *
8 * Permission to use, copy, modify and distribute this software and its *
9 * documentation strictly for non-commercial purposes is hereby granted *
10 * without fee, provided that the above copyright notice appears in all *
11 * copies and that both the copyright notice and this permission notice *
12 * appear in the supporting documentation. The authors make no claims *
13 * about the suitability of this software for any purpose. It is *
14 * provided "as is" without express or implied warranty. *
15 **************************************************************************/
18 #include "AliHLTPHOSRcuTreeMaker.h"
19 #include "AliHLTPHOSBase.h"
20 #include "AliHLTPHOSRcuDigitContainerDataStruct.h"
21 #include "AliHLTPHOSDigitDataStruct.h"
22 #include "AliHLTPHOSDigit.h"
23 #include "TClonesArray.h"
26 ClassImp(AliHLTPHOSRcuTreeMaker);
29 AliHLTPHOSRcuTreeMaker::FUCK()
31 cout << "AliHLTPHOSTreeMaker::FUCK" << endl;
34 AliHLTPHOSRcuTreeMaker::AliHLTPHOSRcuTreeMaker() :
40 fDigitArrayPtr = new TClonesArray("AliHLTPHOSRcuDigit", 300); //!!!!!!!!!!!!!!!!
41 fDigitTreePtr = new TTree("digitTree", "Digits Tree");
43 fDigitTreePtr->Branch("Digit", &fDigitArrayPtr);
47 AliHLTPHOSRcuTreeMaker::~AliHLTPHOSRcuTreeMaker()
52 AliHLTPHOSRcuTreeMaker::MakeDigitArray(AliHLTPHOSRcuDigitContainerDataStruct *digitContainer, Int_t nDigits)
54 AliHLTPHOSDigit *digit = 0;
55 AliHLTPHOSDigitDataStruct *digitStruct = 0;
57 for(UInt_t i = 0; i < digitContainer->fNDigits; i++)
59 digitStruct = &(digitContainer->fDigitDataStruct[i]);
60 digit = (AliHLTPHOSDigit*)fDigitArrayPtr->New(i + nDigits);
61 digit->SetX(digitStruct->fX);
62 digit->SetZ(digitStruct->fZ);
63 digit->SetAmplitude(digitStruct->fAmplitude);
64 digit->SetTime(digitStruct->fTime);
65 digit->SetGain(digitStruct->fGain);
66 digit->SetRawData(digitStruct->fData);
67 digit->SetCrazyness(digitStruct->fCrazyness);
68 digit->SetBaseline(digitStruct->fBaseline);
70 return digitContainer->fNDigits;
74 AliHLTPHOSRcuTreeMaker::FillDigitTree()
76 fDigitTreePtr->Fill();
77 fDigitArrayPtr->Clear();
81 AliHLTPHOSRcuTreeMaker::SetDigitTree(TTree *tree)
84 fDigitTreePtr->Branch("Digit", &fDigitArrayPtr);