X-Git-Url: http://git.uio.no/git/?a=blobdiff_plain;f=MUON%2Fmchview.cxx;h=ae032703e04ffa2b8d27ea3ab0ab30b7724c92e8;hb=81eda6251bd4c5c8d98722fa73f14e947b1e73a4;hp=ca23dc19e584cd5f620bfd262bda98ccda43fa4c;hpb=8f0acce43f1385d0facc4c77b2aeca92a8eaa34c;p=u%2Fmrichter%2FAliRoot.git diff --git a/MUON/mchview.cxx b/MUON/mchview.cxx index ca23dc19e58..ae032703e04 100644 --- a/MUON/mchview.cxx +++ b/MUON/mchview.cxx @@ -34,6 +34,12 @@ #include #include +#include "AliMpDataProcessor.h" +#include "AliMpDataMap.h" +#include "AliMpDataStreams.h" +#include "AliMpDDLStore.h" +#include "AliMpManuStore.h" + //______________________________________________________________________________ Int_t Usage() { @@ -43,6 +49,10 @@ Int_t Usage() cout << " --use filename.root : reuse a previously saved (from this program) root file. Several --use can be used ;-)" << endl; cout << " --geometry #x#+#+# : manually specify the geometry of the window, ala X11..., e.g. --geometry 1280x900+1600+0 will" << endl; cout << " get a window of size 1280x900, located at (1600,0) from the top-left of the (multihead) display " << endl; + cout << " --asciimapping : load mapping from ASCII files instead of OCDB (for debug and experts only...)" << endl; + cout << " --de detElemId : start by displaying the given detection element instead of the default view (which is all the chambers)" << endl; + cout << " --chamber chamberId (from 1 to 10) : start by displaying the given chamber instead of the default view (which is all the chambers)" << endl; + cout << " --ocdb ocdbPath : read the mapping from the given OCDB" << endl; return -1; } @@ -61,9 +71,11 @@ int main(int argc, char** argv) TObjArray filesToOpen; Bool_t isGeometryFixed(kFALSE); - Int_t gix, giy; - Int_t gox,goy; - + Int_t gix(0),giy(0); + Int_t gox(0),goy(0); + Bool_t ASCIImapping(kFALSE); + TString defaultOCDB("local://$ALICE_ROOT/OCDB"); + for ( Int_t i = 0; i <= args.GetLast(); ++i ) { TString a(static_cast(args.At(i))->String()); @@ -87,7 +99,24 @@ int main(int argc, char** argv) nok += 2; ++i; } - + else if ( a == "--asciimapping" ) + { + ++nok; + ASCIImapping = kTRUE; + } + else if ( a == "--de" || a == "--chamber" ) + { + // do nothing. Let AliMUONMchViewApplication handle that one. (and the next one as well). + nok += 2; + ++i; + } + else if ( a == "--ocdb" ) + { + defaultOCDB = static_cast(args.At(i+1))->String(); + cout << "Using default storage = " << defaultOCDB.Data() << endl; + nok += 2; + ++i; + } else { return Usage(); @@ -99,11 +128,27 @@ int main(int argc, char** argv) return Usage(); } - AliWarningGeneral("main","FIXME ? Remove default storage and run number from here..."); - - AliCDBManager::Instance()->SetDefaultStorage("local://$ALICE_ROOT/OCDB"); + AliCDBManager::Instance()->SetDefaultStorage(defaultOCDB.Data()); AliCDBManager::Instance()->SetRun(0); + if ( ASCIImapping ) + { + AliMpDataProcessor mp; + { + AliMpDataMap* datamap = mp.CreateDataMap("data"); + AliMpDataStreams dataStreams(datamap); + AliMpDDLStore::ReadData(dataStreams); + } + { + AliMpDataMap* datamap = mp.CreateDataMap("data_run"); + AliMpDataStreams dataStreams(datamap); + AliMpManuStore::ReadData(dataStreams); + } + + AliCDBManager::Instance()->SetSpecificStorage("MUON/Calib/Neighbours","local://$ALICE_ROOT/OCDB"); + + } + gROOT->SetStyle("Plain"); gStyle->SetPalette(1); Int_t n = gStyle->GetNumberOfColors(); @@ -117,23 +162,17 @@ int main(int argc, char** argv) gStyle->SetPalette(n+2,colors); delete[] colors; - UInt_t w(0); - UInt_t h(0); - UInt_t ox(0); - UInt_t oy(0); + AliMUONMchViewApplication* theApp(0x0); if ( isGeometryFixed ) { - w = gix; - h = giy; - ox = gox; - oy = goy; + theApp = new AliMUONMchViewApplication("mchview", &argc, argv,gix,giy,gox,goy); + } + else + { + theApp = new AliMUONMchViewApplication("mchview",&argc,argv); } - - AliMUONMchViewApplication* theApp = new AliMUONMchViewApplication("mchview", &argc, argv, w,h,gox,goy); - AliCodeTimer::Instance()->Print(); - TIter next(&filesToOpen); TObjString* s; while ( ( s = static_cast(next()) ) )