From: cvetan Date: Fri, 3 Sep 2010 15:04:35 +0000 (+0000) Subject: Introduction of the LTU config class. X-Git-Url: http://git.uio.no/git/?a=commitdiff_plain;h=f49525a44dee9291dda8590e1abb6aeadc26f1b7;hp=25732bff073cc6e0a900eb7fccc7bb2351a46a5d;p=u%2Fmrichter%2FAliRoot.git Introduction of the LTU config class. --- diff --git a/STEER/AliLTUConfig.cxx b/STEER/AliLTUConfig.cxx new file mode 100644 index 00000000000..472cee90d0a --- /dev/null +++ b/STEER/AliLTUConfig.cxx @@ -0,0 +1,53 @@ +/************************************************************************** + * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * + * * + * Author: The ALICE Off-line Project. * + * Contributors are mentioned in the code where appropriate. * + * * + * Permission to use, copy, modify and distribute this software and its * + * documentation strictly for non-commercial purposes is hereby granted * + * without fee, provided that the above copyright notice appears in all * + * copies and that both the copyright notice and this permission notice * + * appear in the supporting documentation. The authors make no claims * + * about the suitability of this software for any purpose. It is * + * provided "as is" without express or implied warranty. * + **************************************************************************/ + +/////////////////////////////////////////////////////////////////////////////// +// // +// Class that describes a detector LTU configuration // +// // +// // +// Presently we store a subset of the LTU parameters: // +// FineDelay1 3126 # picosec // +// FineDelay2 20459 # picosec // +// BC_DELAY_ADD 18 # ns // +// // +// cvetan.cheshkov@cern.ch 3/9/2010 // +/////////////////////////////////////////////////////////////////////////////// + +#include + +#include "AliLog.h" +#include "AliDAQ.h" +#include "AliLTUConfig.h" + +ClassImp( AliLTUConfig ) + +//_____________________________________________________________________________ +void AliLTUConfig::Print( const Option_t* ) const +{ + // Print + cout << "LTU Config:" << endl; + cout << " Detector: " << GetDetectorName() << "(Id=" << (Int_t)fDetectorId << ")" << endl; + cout << " FineDelay1: " << fFineDelay1 << " ns" << endl; + cout << " FineDelay2: " << fFineDelay2 << " ns" << endl; + cout << " BCDelayAdd: " << fBCDelayAdd << " ns" << endl; +} + +//_____________________________________________________________________________ +const char* AliLTUConfig::GetDetectorName() const +{ + // Get the detector name (DAQ naming scheme) + return AliDAQ::DetectorName((Int_t)fDetectorId); +} diff --git a/STEER/AliLTUConfig.h b/STEER/AliLTUConfig.h new file mode 100644 index 00000000000..653ff300520 --- /dev/null +++ b/STEER/AliLTUConfig.h @@ -0,0 +1,67 @@ +#ifndef ALILTUCONFIG_H +#define ALILTUCONFIG_H + +/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * + * See cxx source for full Copyright notice */ + +/////////////////////////////////////////////////////////////////////////////// +// // +// Class that describes a detector LTU configuration // +// // +// // +// Presently we store a subset of the LTU parameters: // +// FineDelay1 3126 # picosec // +// FineDelay2 20459 # picosec // +// BC_DELAY_ADD 18 # ns // +// // +// cvetan.cheshkov@cern.ch 3/9/2010 // +/////////////////////////////////////////////////////////////////////////////// + + +#include + +class AliLTUConfig : public TObject { + +public: + AliLTUConfig(): TObject(), + fDetectorId(-1), + fFineDelay1(0.), + fFineDelay2(0.), + fBCDelayAdd(0.) + {} + AliLTUConfig(UChar_t detectorId, Float_t fineDelay1, Float_t fineDelay2, Float_t bcDelayAdd): TObject(), + fDetectorId(detectorId), + fFineDelay1(fineDelay1), + fFineDelay2(fineDelay2), + fBCDelayAdd(bcDelayAdd) + {} + AliLTUConfig(AliLTUConfig & ltu): TObject(ltu), + fDetectorId(ltu.fDetectorId), + fFineDelay1(ltu.fFineDelay1), + fFineDelay2(ltu.fFineDelay2), + fBCDelayAdd(ltu.fBCDelayAdd) + {} + virtual ~AliLTUConfig() {} + + // Getters + Char_t GetDetectorId() const { return fDetectorId; } + const char* GetDetectorName() const; + Float_t GetFineDelay1() const { return fFineDelay1; } + Float_t GetFineDelay2() const { return fFineDelay2; } + Float_t GetBCDelayAdd() const { return fBCDelayAdd; } + + virtual void Print( const Option_t* opt ="" ) const; + +private: + AliLTUConfig & operator=(const AliLTUConfig & ); + + Char_t fDetectorId; // Detector ID, see AliDAQ class for more details + Float_t fFineDelay1; // Fine delay in ns + Float_t fFineDelay2; // Fine delay in ns + Float_t fBCDelayAdd; // BC_DELAY_ADD in ns + + ClassDef( AliLTUConfig, 1 ) // LTU Configuration class +}; + + +#endif diff --git a/STEER/STEERLinkDef.h b/STEER/STEERLinkDef.h index 8c1b44ae5d8..7a984a59bb0 100644 --- a/STEER/STEERLinkDef.h +++ b/STEER/STEERLinkDef.h @@ -175,6 +175,8 @@ #pragma link C++ class AliLHCClockPhase+; +#pragma link C++ class AliLTUConfig+; + #pragma link C++ typedef AliLHCDipValD; #pragma link C++ typedef AliLHCDipValI; #pragma link C++ typedef AliLHCDipValF; diff --git a/STEER/libSTEER.pkg b/STEER/libSTEER.pkg index b716804d7a3..4c6ae93c4d9 100644 --- a/STEER/libSTEER.pkg +++ b/STEER/libSTEER.pkg @@ -77,7 +77,8 @@ AliGRPManager.cxx \ AliDCSArray.cxx AliLHCReader.cxx \ AliLHCDipValT.cxx AliLHCData.cxx \ AliCTPTimeParams.cxx AliCTPInputTimeParams.cxx \ -AliLHCClockPhase.cxx +AliLHCClockPhase.cxx \ +AliLTUConfig.cxx HDRS:= $(SRCS:.cxx=.h)