
// table for the calibration log
create table calibtime(RunId number,
                       begin  date,
                       end    date,
                       primary key(RunId)
                      );

//  table for capacity of each channel
create table capacity( ChId     number,
                       capacity number,
                       primary key (ChId)
                      );


//tables for pedestal test
create table pulserPattern(PatternId number,
                          ChId      number,
                          primary key(PatternId,ChId)
                         );
create table pdtest(RunId number,
                    GainType number,
                    ChId  number,
                    mean  number,
                    sig   number,
                    fc    number,
                    fs    number,
                    primary key (RunId,GainType,ChId)
                   );

create table pdtest2(RunId number,
                     GainType number,
                     ChId  number,
                     sig3  number,
                     sig4  number,
                     primary key (RunId, GainType,ChId)
                    );

//tables for pulser test
create table plstest(RunId number,
                     GainType number,
                     ChId  number,
                     height  number,
                     mean    number,
                     sig     number,
                     fc      number,
                     fs      number,
                     primary key(RunId,GainType,ChId)
                    );

create table plsnoise(RunId number,
                     GainType number,
                     ChId  number,
                     height number,
                     sig3  number,
                     sig4  number,
                     primary key (RunId, GainType,ChId)
                    );


// table for the whole experimental setup
create table setup(CrateId char(20),
                   CardId  number,
                   ChId    number,
                   primary key (CrateId,CardId,ChId)
                  );


create table geom(ChId number,
                  theta number,
                  phi   number,
                  primary key(ChId)
                 );




 

                       






































