StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Name.cc
1 #include "Name.h"
2 
3 #include <cstring>
4 #include <cstdio>
5 
6 // definitions
7 
8 void
9 setName(char* buf,const char* base,
10  int bin,int weight,const char* pm)
11 {
12 
13  if(pm){
14  sprintf(buf,"bin%d.weight%d.%s.%s",bin,weight,pm,base);
15  }
16  else{
17  sprintf(buf,"bin%d.weight%d.%s",bin,weight,base);
18  }
19 }
20 
21 void
22 setNameWeight(char* buf, const char* base,int bin, const char* pm)
23 {
24  if(pm){
25  sprintf(buf,"bin%d.weight.%s.%s",bin,pm,base);
26  }
27  else{
28  sprintf(buf,"bin%d.weight.%s",bin,base);
29  }
30 
31 }
32 
33 void
34 setName(char* buf,const char* base,
35  int bin,const char* pm)
36 {
37 
38  if(pm){
39  sprintf(buf,"bin%d.%s.%s",bin,pm,base);
40  }
41  else{
42  sprintf(buf,"bin%d.%s",bin,base);
43  }
44 }
45 
46 
47 void
48 setName(char* buf, const char* base,const char* ew,const char* pm)
49 {
50  sprintf(buf,"%s.%s.%s",ew,pm,base);
51 }
52 
53 void
54 setName(char* buf, const char* base,const char* pm)
55 {
56  sprintf(buf,"%s.%s",pm,base);
57 }