84{
85 int* pars = nullptr;
86
87
88 char* dqmserver = m_conf->getconf("dqmserver", "nodename");
89 RFNSM_Status::Instance().set_flag(0);
90
91 b2nsm_sendreq(dqmserver, "RC_LOAD", 0, pars);
92 while (RFNSM_Status::Instance().get_flag() == 0) b2nsm_wait(1);
93 printf("RFMaster:: dqmserver configured\n");
94
95
96
97 char* distributor = m_conf->getconf("distributor", "nodename");
98 RFNSM_Status::Instance().set_flag(0);
99
100 b2nsm_sendreq(distributor, "RC_LOAD", 0, pars);
101 while (RFNSM_Status::Instance().get_flag() == 0) b2nsm_wait(1);
102 printf("RFMaster:: distributor configured\n");
103
104
105
106
107 int maxnodes = m_conf->getconfi("processor", "nnodes");
108 int idbase = m_conf->getconfi("processor", "idbase");
109 char* hostbase = m_conf->getconf("processor", "nodebase");
110 char* badlist = m_conf->getconf("processor", "badlist");
111
112 char hostnode[512], idname[3];
113 int nnodes = 0;
114 RFNSM_Status::Instance().set_flag(0);
115 for (int i = 0; i < maxnodes; i++) {
116 sprintf(idname, "%2.2d", idbase + i);
117 if (badlist == NULL ||
118 strstr(badlist, idname) == 0) {
119 sprintf(hostnode, "evp_%s%2.2d", hostbase, idbase + i);
120
121 b2nsm_sendreq(hostnode, "RC_LOAD", 0, pars);
122 nnodes++;
123 }
124 }
125
126 sleep(10);
127
128 printf("RFMaster:: distributor configured\n");
129
130
131 char* collector = m_conf->getconf("collector", "nodename");
132 RFNSM_Status::Instance().set_flag(0);
133
134 b2nsm_sendreq(collector, "RC_LOAD", 0, pars);
135 while (RFNSM_Status::Instance().get_flag() == 0) b2nsm_wait(1);
136 printf("RFMaster:: collector configured\n");
137
138
139
140 char* roisender = m_conf->getconf("roisender", "nodename");
141 RFNSM_Status::Instance().set_flag(0);
142
143 b2nsm_sendreq(roisender, "RC_LOAD", 0, pars);
144 while (RFNSM_Status::Instance().get_flag() == 0) b2nsm_wait(1);
145 printf("RFMaster:: roisender configured\n");
146
147 return 0;
148}