2 * A script that will run the most simple chain possible.
4 * What is done, depends on a bit mask:
7 * ----+-----------------------
9 * 1 | Make digits from hits
10 * 2 | Make sdigits from hits
11 * 3 | Make raw DDL files from digits
12 * 4 | Make ESD from raw ddl files
13 * 5 | Display the data
15 * So a mask of 0x3f means do everything, while 0x2 means
16 * only make digits from hits, and 0x1F is all but display.
20 const char* path = "$ALICE_ROOT/FMD/scripts/";
23 RunAndDisplay(const char* script, bool show, const char* display)
25 gROOT->Macro(Form("%s/%s", path, script));
27 gSystem->Exec(Form("aliroot -q -l %s/%s &", path, display));
31 RunSimpleChain(Int_t what=0x3b)
34 std::cout << "Usage: RunSimpleChain(MASK)\n\n"
35 << "MASK is a bit mask of things to do:\n\n"
37 << "\t----+-----------------------\n"
38 << "\t 0 | Make fake hits\n"
39 << "\t 1 | Make digits from hits\n"
40 << "\t 2 | Make sdigits from hits\n"
41 << "\t 3 | Make raw DDL files from digits\n"
42 << "\t 4 | Make ESD from raw ddl files\n"
43 << "\t 5 | Display the data\n\n"
44 << "So a mask of 0x3f means do everything, while 0x2 means\n"
45 << "only make digits from hits, and 0x1F is all but display.\n"
49 Bool_t display = (what & (1 << 5));
51 if (what & (1 << 0)) {
52 std::cout << "Making fake hits" << std::endl;
53 RunAndDisplay("MakeFakeHits.C", display, "PatternHits.C");
56 if (what & (1 << 1)) {
57 std::cout << "Converting hits to digits" << std::endl;
58 RunAndDisplay("Hits2Digits.C", display, "PatternDigits.C");
61 if (what & (1 << 2)) {
62 std::cout << "Converting hits to summable digits" << std::endl;
63 RunAndDisplay("Hits2SDigits.C", display, "PatternSDigits.C");
66 if (what & (1 << 3)) {
67 std::cout << "Converting digits to raw data" << std::endl;
68 gSystem->Exec("rm -rf raw0");
69 RunAndDisplay("Digits2Raw.C", false, "");
71 std::cout << "Moving ddl files" << std::endl;
72 gSystem->mkdir("raw0");
73 gSystem->Exec("mv FMD_*.ddl raw0/");
74 gSystem->Exec("touch raw0/run0");
76 gSystem->Exec(Form("aliroot -q %s/PatternRaw.C\\(\\\"\\\"\\) &", path));
79 if (what & (1 << 4)) {
80 std::cout << "Making ESD from raw data" << std::endl;
81 RunAndDisplay("Raw2ESD.C", display, "PatternESD.C");
84 std::cout << "All done" << std::endl;