source: branches/AddingGoogleTestEnvironment/datacenter/macros/stage.C

Last change on this file was 9038, checked in by tbretz, 16 years ago
*** empty log message ***
File size: 891 bytes
Line 
1#include <iostream>
2
3#include <TSystem.h>
4
5#include "MSQLMagic.h"
6#include "MSequenceSQL.h"
7
8using namespace std;
9
10void stage(MSequence &s, TString path)
11{
12 MDirIter iter1, iter2;
13
14 s.GetRuns(iter1, MSequence::kRawPed, path);
15 s.GetRuns(iter1, MSequence::kRawCal, path);
16 s.GetRuns(iter1, MSequence::kRawDat, path);
17
18 TString req = "ssh -nx phoenix /opt/SUNWsamfs/bin/stage -V";
19 while (1)
20 {
21 TString name = iter1.Next();
22 if (name.IsNull())
23 break;
24
25 req += " "+name;
26 }
27
28 gSystem->Exec(req);
29}
30
31int stage(Int_t sequno, Int_t tel, TString path="")
32{
33 const MSequenceSQL s("sql.rc", sequno, tel);
34 if (!s.IsValid())
35 return 2;
36
37 stage(s, path);
38
39 return 0;
40}
41
42int stage(const char *seq, TString path="")
43{
44 const MSequence s(seq);
45 if (!s.IsValid())
46 return 2;
47
48 stage(s, path);
49
50 return 0;
51}
Note: See TracBrowser for help on using the repository browser.