From 24dbd5dd70e000c112acbaa5c3f010f77633a031 Mon Sep 17 00:00:00 2001 From: laphecet Date: Tue, 27 May 2008 14:00:48 +0000 Subject: [PATCH] Last missing bit and pieces from the last commit, related to Shuttle mainly --- MUON/AliMUON2DStoreValidator.cxx | 19 +++--- MUON/AliMUONCheckItem.cxx | 21 ++++--- MUON/AliMUONCheckItem.h | 7 +-- MUON/AliMUONCheckItemIterator.cxx | 86 -------------------------- MUON/AliMUONCheckItemIterator.h | 43 ------------- MUON/AliMUONPedestalEventGenerator.cxx | 14 +++-- MUON/MUONcoreLinkDef.h | 1 - MUON/READMEshuttle.txt | 34 ++++++---- MUON/libMUONcore.pkg | 1 - 9 files changed, 56 insertions(+), 170 deletions(-) delete mode 100644 MUON/AliMUONCheckItemIterator.cxx delete mode 100644 MUON/AliMUONCheckItemIterator.h diff --git a/MUON/AliMUON2DStoreValidator.cxx b/MUON/AliMUON2DStoreValidator.cxx index 5dd8a34301d..de5a02c2728 100644 --- a/MUON/AliMUON2DStoreValidator.cxx +++ b/MUON/AliMUON2DStoreValidator.cxx @@ -19,7 +19,6 @@ #include "AliLog.h" #include "AliMUONCheckItem.h" -#include "AliMUONCheckItemIterator.h" #include "AliMUONVCalibParam.h" #include "AliMUONVStore.h" #include "AliMpConstants.h" @@ -204,11 +203,9 @@ AliMUON2DStoreValidator::ReportManu(TList& lines, AliMUONCheckItem& manu) /// Report list of missing channels from this manu TObjString* channel(0x0); - AliMUONCheckItemIterator it(manu); + TIter next(manu.CreateIterator()); - it.First(); - - while ( ( channel = static_cast(it.Next()) ) ) + while ( ( channel = static_cast(next()) ) ) { lines.Add(new TObjString(Form("\t\t\tChannel %s is missing or dead", channel->GetString().Data()))); @@ -222,13 +219,13 @@ AliMUON2DStoreValidator::ReportDE(TList& lines, AliMUONCheckItem& de) { /// Report list of missing manus from this de AliMUONCheckItem* manu(0x0); - AliMUONCheckItemIterator it(de); + + TIter next(de.CreateIterator()); lines.Add(new TObjString(Form("DE %5d",de.GetID()))); - it.First(); - while ( ( manu = static_cast(it.Next()) ) ) + while ( ( manu = static_cast(next()) ) ) { if ( manu->IsDead() ) { @@ -248,11 +245,9 @@ AliMUON2DStoreValidator::ReportChamber(TList& lines, AliMUONCheckItem& chamber) /// Report list of missing de from this chamber AliMUONCheckItem* de(0x0); - AliMUONCheckItemIterator it(chamber); - - it.First(); + TIter next(chamber.CreateIterator()); - while ( ( de = static_cast(it.Next()) ) ) + while ( ( de = static_cast(next()) ) ) { if ( de->IsDead() ) { diff --git a/MUON/AliMUONCheckItem.cxx b/MUON/AliMUONCheckItem.cxx index e51ab1256d5..10bd1bebfd6 100644 --- a/MUON/AliMUONCheckItem.cxx +++ b/MUON/AliMUONCheckItem.cxx @@ -19,8 +19,8 @@ #include "AliLog.h" #include "AliMpExMap.h" +#include "AliMpExMapIterator.h" #include "Riostream.h" -#include "AliMUONCheckItemIterator.h" //----------------------------------------------------------------------------- /// \class AliMUONCheckItem @@ -109,12 +109,11 @@ AliMUONCheckItem::ComputeDead() const } else { - AliMUONCheckItemIterator it(*this); + TIter next(CreateIterator()); AliMUONCheckItem* item; - it.First(); Int_t ndead(0); fDead=0; - while ( ( item = dynamic_cast(it.Next()) ) ) + while ( ( item = dynamic_cast(next()) ) ) { if ( item->IsDead() ) ++ndead; } @@ -122,6 +121,14 @@ AliMUONCheckItem::ComputeDead() const } } +//_____________________________________________________________________________ +TIterator* +AliMUONCheckItem::CreateIterator() const +{ + /// Create iterator on this item + return fMissing->CreateIterator(); +} + //_____________________________________________________________________________ TObject* AliMUONCheckItem::GetItem(Int_t id) const @@ -163,11 +170,9 @@ AliMUONCheckItem::Print(Option_t* opt) const { TObject* object(0x0); - AliMUONCheckItemIterator it(*this); - - it.First(); + TIter next(CreateIterator()); - while ( ( object = it.Next() ) ) + while ( ( object = next() ) ) { object->Print(opt); } diff --git a/MUON/AliMUONCheckItem.h b/MUON/AliMUONCheckItem.h index 7f73288f73f..803f668ef53 100644 --- a/MUON/AliMUONCheckItem.h +++ b/MUON/AliMUONCheckItem.h @@ -17,13 +17,10 @@ #endif class AliMpExMap; -class TExMapIter; -class AliMUONCheckItemIterator; +class TIterator; class AliMUONCheckItem : public TNamed { - friend class AliMUONCheckItemIterator; - public: AliMUONCheckItem(Int_t id, Int_t maxNumber, const char* name); @@ -40,6 +37,8 @@ public: void Print(Option_t* opt="") const; + TIterator* CreateIterator() const; + private: /// Not implemented AliMUONCheckItem(const AliMUONCheckItem&); diff --git a/MUON/AliMUONCheckItemIterator.cxx b/MUON/AliMUONCheckItemIterator.cxx deleted file mode 100644 index b393eefbfef..00000000000 --- a/MUON/AliMUONCheckItemIterator.cxx +++ /dev/null @@ -1,86 +0,0 @@ -/************************************************************************** -* 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. * -**************************************************************************/ - -// $Id$ - -#include "AliMUONCheckItemIterator.h" -#include "TExMap.h" -#include "AliMpExMap.h" -#include "AliMUONCheckItem.h" -#include "AliLog.h" - -//----------------------------------------------------------------------------- -/// \class AliMUONCheckItemIterator -/// -/// Iterator on AliMUONCheckItem objects -/// -/// -/// \author Laurent Aphecetche -//----------------------------------------------------------------------------- - -/// \cond CLASSIMP -ClassImp(AliMUONCheckItemIterator) -/// \endcond - -//_____________________________________________________________________________ -AliMUONCheckItemIterator::AliMUONCheckItemIterator() : TObject(), fIter(0x0) -{ - /// default ctor -} - -//_____________________________________________________________________________ -AliMUONCheckItemIterator::AliMUONCheckItemIterator(const AliMUONCheckItem& item) -: TObject(), -fIter(0x0) -{ - /// ctor - /// \todo To be reimplemented - AliMpExMap* m = item.fMissing; - AliFatal("Reimplement me w/o AliMpExMap::GetIterator()"); -// fIter = new TExMapIter(m->GetIterator()); -} - -//_____________________________________________________________________________ -AliMUONCheckItemIterator::~AliMUONCheckItemIterator() -{ - /// dtor - delete fIter; -} - -//_____________________________________________________________________________ -void -AliMUONCheckItemIterator::First() -{ - /// Rewind the iterator - if ( fIter) fIter->Reset(); -} - -//_____________________________________________________________________________ -TObject* -AliMUONCheckItemIterator::Next() -{ - /// Advance one object. Return 0 if ended. - if (!fIter) return 0x0; - Long_t key, value; - Bool_t ok = fIter->Next(key,value); - if (ok) - { - return reinterpret_cast(value); - } - else - { - return 0x0; - } -} diff --git a/MUON/AliMUONCheckItemIterator.h b/MUON/AliMUONCheckItemIterator.h deleted file mode 100644 index f1daa8685ee..00000000000 --- a/MUON/AliMUONCheckItemIterator.h +++ /dev/null @@ -1,43 +0,0 @@ -#ifndef ALIMUONCHECKITEMITERATOR_H -#define ALIMUONCHECKITEMITERATOR_H - -/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * -* See cxx source for full Copyright notice */ - -// $Id$ - -/// \ingroup core -/// \class AliMUONCheckItemIterator -/// \brief Iterator on CheckItem -/// -// Author Laurent Aphecetche - -#ifndef ROOT_TObject -# include "TObject.h" -#endif - -class AliMUONCheckItem; -class TExMapIter; - -class AliMUONCheckItemIterator : public TObject -{ -public: - AliMUONCheckItemIterator(); - AliMUONCheckItemIterator(const AliMUONCheckItem& object); - virtual ~AliMUONCheckItemIterator(); - - void First(); - TObject* Next(); - -private: - /// Not implemented - AliMUONCheckItemIterator(const AliMUONCheckItemIterator&); - /// Not implemented - AliMUONCheckItemIterator& operator=(const AliMUONCheckItemIterator&); - - TExMapIter* fIter; //!< the actual iterator doing the job - - ClassDef(AliMUONCheckItemIterator,1) // Iterator for AliMUONCheckItem objects -}; - -#endif diff --git a/MUON/AliMUONPedestalEventGenerator.cxx b/MUON/AliMUONPedestalEventGenerator.cxx index 6944872bea6..fabf0891a34 100644 --- a/MUON/AliMUONPedestalEventGenerator.cxx +++ b/MUON/AliMUONPedestalEventGenerator.cxx @@ -17,14 +17,15 @@ #include "AliMUONPedestalEventGenerator.h" +#include "AliCodeTimer.h" +#include "AliDAQ.h" #include "AliHeader.h" #include "AliLog.h" #include "AliMUONCalibrationData.h" -#include "AliMUONVDigitStore.h" #include "AliMUONRawWriter.h" -#include "AliCodeTimer.h" #include "AliMUONVCalibParam.h" #include "AliMUONVDigit.h" +#include "AliMUONVDigitStore.h" #include "AliMUONVStore.h" #include "AliMpCathodType.h" #include "AliMpConstants.h" @@ -32,6 +33,7 @@ #include "AliMpDetElement.h" #include "AliMpIntPair.h" #include "AliMpPlaneType.h" +#include "AliRawDataHeaderSim.h" #include "AliRunLoader.h" #include #include @@ -39,7 +41,6 @@ #include #include #include -#include "AliDAQ.h" //----------------------------------------------------------------------------- /// \class AliMUONPedestalEventGenerator @@ -320,7 +321,12 @@ AliMUONPedestalEventGenerator::Digits2Raw(Int_t event) AliCodeTimerAuto("") - if (!fRawWriter) fRawWriter = new AliMUONRawWriter; + if (!fRawWriter) + { + AliRawDataHeaderSim header; + fRawWriter = new AliMUONRawWriter; + fRawWriter->SetHeader(header); + } // Generate RAW data from the digits // Be carefull to create&change to the correct directory first... diff --git a/MUON/MUONcoreLinkDef.h b/MUON/MUONcoreLinkDef.h index 0b748b48f46..bfa6c4ecf98 100644 --- a/MUON/MUONcoreLinkDef.h +++ b/MUON/MUONcoreLinkDef.h @@ -25,7 +25,6 @@ #pragma link C++ class AliMUON1DArray+; #pragma link C++ class AliMUON1DMap+; #pragma link C++ class AliMUONCheckItem+; -#pragma link C++ class AliMUONCheckItemIterator+; #pragma link C++ class AliMUONVStore+; #pragma link C++ class AliMUONTreeManager+; #pragma link C++ class AliMUONLogger+; diff --git a/MUON/READMEshuttle.txt b/MUON/READMEshuttle.txt index a3be2bde43f..6074ec7a896 100644 --- a/MUON/READMEshuttle.txt +++ b/MUON/READMEshuttle.txt @@ -33,7 +33,7 @@ Depending on how this one is constructed, and depending on the runtype, it will
 
 detName   runType                     task to be done           worker class (AliMUONVSubprocessor child)
 --------------------------------------------------------------------------------------------------------
-MCH       PEDESTAL_RUN                read ASCII ped files      AliMUONPedestalSubprocessor
+MCH       PEDESTAL                    read ASCII ped files      AliMUONPedestalSubprocessor
                                       and put them into OCDB
                         
 MCH       GMS                         read GMS alignment files  AliMUONGMSSubprocessor
@@ -42,7 +42,7 @@ MCH       GMS                         read GMS alignment files  AliMUONGMSSubpro
 MCH       PHYSICS                     read DCS HV values and    AliMUONHVSubprocessor
                                       put them into OCDB
                                       
-MCH       ELECTRONICS_CALIBRATION_RUN read ASCII gain files     prototype only = AliMUONGainSubprocessor
+MCH       CALIBRATION                 read ASCII gain files     AliMUONGainSubprocessor
                                       and put them into OCDB
                                       
 MTR       to be defined               to be defined             to be done
@@ -61,12 +61,25 @@ using the WritePedestals() method of AliMUONCDB class
 
 So first generate a valid pedestal CDB entry by using the AliMUONCDB class. There's one
  little trick : you should first point to the "default" OCDB (local://$ALICE_ROOT) in
- order to get the mapping loaded. Then only you can play with another OCDB.
+ order to get the mapping loaded, then only you can play with another OCDB. 
+ Or, alternatively, you can put the mapping stuff in the test OCDB, like this :
+ 
+
+root[] AliMpDDLStore::ReadData(); // read mapping from ASCII files
+root[] const char* cdbpath="local://$ALICE_ROOT/SHUTTLE/TestShuttle/TestCDB"; // where to put the CDB
+root[] AliCDBManager::Instance()->SetDefaultStorage(cdbpath);
+root[] AliMpCDB::WriteMpSegmentation();
+root[] AliMpCDB::WriteDDLStore();
+
+If you've not put the mapping in the test database, then you must start with the default OCDB, load the mapping, and then only switch to the + test database : +
-root[] AliCDBManager::Instance()->SetDefaultStorage("local://$ALICE_ROOT");
-root[] AliCDBManager::Instance()->SetRun(0);
-root[] AliMpCDB::LoadDDLStore();
+root[] AliCDBManager::Instance()->SetDefaultStorage("local://$ALICE_ROOT"); // only if you've not put the mapping in test OCDB
+root[] AliCDBManager::Instance()->SetRun(0); // only if you've not put the mapping in test OCDB
+root[] AliMpCDB::LoadDDLStore(); // only if you've not put the mapping in test OCDB
+// below are lines to be executed whatever you did with the mapping...
 root[] const char* cdbpath="local://$ALICE_ROOT/SHUTTLE/TestShuttle/TestCDB"; // where to put the CDB
 root[] AliMUONCDB cdb(cdbpath)
 root[] Bool_t defaultValues = kFALSE; // to generate random values instead of plain zeros...
@@ -91,6 +104,7 @@ Then use the AliMUONPedestalEventGenerator to produce simulated pedestal events.
 
 Usage (from the Root prompt) :
 
+AliMpCDB::LoadDDLStore2(); // load mapping from "default" OCDB=local://$ALICE_ROOT
 AliCDBManager::Instance()->SetDefaultStorage(cdbpath); // so you will read 
 // back pedestals values generated in the previous step
 const char* dateFileName = "raw.date"; // base filename for the output
@@ -111,13 +125,11 @@ per LDC, as will be used in real life), the latter ones being roughly 100 MB eac
 // FIXME : instructions below should be replaced with usage of MUONTRKda
 //
 
-The raw.date.LDC* files are then processed using the makeped online program 
-(currently found, pending an agreement on where to put online programs under cvs,
- under /afs/cern.ch/user/a/abaldiss/public/v16; Please contact Alberto to check 
- it's the latest version) which outputs manus-*.ped ASCII files (one per LDC) :
+The raw.date.LDC* files are then processed using the DA online program (which is not built by default, but must be made
+ explicitely using make daqDA-MCH from $ALICE_ROOT, and requires some DATE setup..., see \ref READMEmchda.txt )
  
 
- makeped -f raw.date.LCDi -a LDCi.ped (i=0,1,2,3)
+ MUONTRKda.exe -f raw.date.LCDi -a LDCi.ped (i=0,1,2,3)
  
  (repeat for each LDC)
 
diff --git a/MUON/libMUONcore.pkg b/MUON/libMUONcore.pkg index 1c3553068b7..9ab08a92437 100644 --- a/MUON/libMUONcore.pkg +++ b/MUON/libMUONcore.pkg @@ -14,7 +14,6 @@ SRCS:= mapping/AliMpIntPair.cxx \ AliMUON1DArray.cxx \ AliMUON1DMap.cxx \ AliMUONCheckItem.cxx \ - AliMUONCheckItemIterator.cxx \ AliMUONVStore.cxx \ AliMUONTreeManager.cxx \ AliMUONLogger.cxx -- 2.43.0